package cn.wjh.business.controller;

import cn.wjh.business.service.IMailService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/business/mail")
public class MailController extends BaseController {

	@Resource
	private IMailService mailService;

	/*获取邮箱验证码*/
	@Anonymous
	@GetMapping("/getCode")
	public AjaxResult sendVerifyCode(String email,String title) {
		return toAjax(mailService.sendVerificationCode(email, title));
	}
}
